<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<title>偶尔有点困-测试</title>
		<link rel="stylesheet" href="../css/layui.css" />
	</head>

	<body>
		<form class="layui-form" action="" lay-filter="formTest">
			<div class="layui-form-item">
				<label class="layui-form-label">输入框</label>
				<div class="layui-input-block">
					<input type="text" name="title" required lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item layui-form-text">
				<label class="layui-form-label">文本域</label>
				<div class="layui-input-block">
					<textarea name="desc" placeholder="请输入内容" class="layui-textarea"></textarea>
				</div>
			</div>
			<div class="layui-form-item layui-form-text">
				<label class="layui-form-label">文本域</label>
				<div class="layui-input-block">
					<textarea id="demo" name="textarea" style="display: none;"></textarea>
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-input-block">
					<button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
					<button type="reset" class="layui-btn layui-btn-primary">重置</button>
				</div>
			</div>
		</form>
		<a target="_blank" href="http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&email=GSgqIC8sKCopLy9ZaGg3enZ0" style="text-decoration:none;"><img src="http://rescdn.qqmail.com/zh_CN/htmledition/images/function/qm_open/ico_mailme_01.png" /></a>
	</body>
	<script type="text/javascript" src="../layui.js"></script>
	<script>
		layui.use(['layedit', 'form'], function() {
			var layedit = layui.layedit,
				form = layui.form;
			var index = layedit.build('demo');
			form.val("formTest", {
				"title": "贤心",
				"desc": "女",
				"textarea": "内容动态"
			});
			layedit.setContent(index, "动态内容", true);
		});
	</script>

</html>